#include<stdio.h>
#include<unistd.h>


int gav = 100;

int main()
{
  pid_t id = fork();
  int cot = 0;
  if(id == 0)
  {
    while(1)
    {
      printf(" I am child! pid:%d;gav = %d;&gav = %p;\n",getpid(), gav, &gav);
      cot++;
      sleep(1);
      if(cot == 5)
      {
       gav = 200;
      
      }
    }
  }
  else
  {
    while(1)
    {
      printf(" I am father! pid:%d;gav = %d;&gav = %p;\n",getpid(), gav, &gav);
      sleep(1);
    }
  }


  return 0;
}
